<%
            bean.DataBaseConnection conn = new bean.DataBaseConnection ();
%>

<jsp:useBean id="mobil" scope="session" class="kontrol.mobil"/>

<%@ page import="java.io.*" %>
<%@ page import="com.oreilly.servlet.MultipartRequest" %>
<%@page import="java.util.ArrayList"%>

<%
            ArrayList<kontrol.mobil> vmobil = new kontrol.Proses().getDisplay();
%>
<%
            String contentType = request.getContentType();
            if ((contentType != null) && (contentType.indexOf("multipart/form-data") >= 0)) {
                MultipartRequest mr = new MultipartRequest(request, request.getRealPath("./Mobil"), 1024 * 1024 * 1024);
                mobil.setNamamobil(mr.getParameter("namamobil"));
                mobil.setHarga(mr.getParameter("harga"));
                mobil.setPemilik(mr.getParameter("pemilik"));
             
                mobil.setGambar("./Mobil/" + mr.getOriginalFileName("gambar"));
            }
%>


 
<html>
    <head>
        <title>GARASI | ROUTER RENT CAR</title>
        <style>
            #main{
                font-weight: bold;
                padding-left:0px;
                padding-right:0px;
                margin-top: 30px;
                margin-left:150px;
                margin-right:75px;
                margin-bottom:0px;
            }

            #menuhor{
                list-style-type: disc;
                margin: 0;
                padding: 0;

                float: left;
            }
            #menuhor li {
                margin: 0;
                padding: 0;
                float: left;

            }
            #menuhor a {
                float: none;
                width: 180px;
                text-align: center;
                color: #FFF;
                text-decoration: none;
                padding: 2px;
                line-height: 2;
                margin-bottom: 3px;

            }
            #menuhor a:hover{
                background: pink;
            }

            #iklan{
                list-style-type: none;
                margin: 0;
                padding: 0;
                width: 180px;
                background-color: red;
                float: left;
            }

        </style>
    </head>

    <body background="images/space.jpg">

        <div id="main">
            <img alt="cover" src="images/cod.gif" width="1050" height="400">
            <br><br>
            <marquee> <m style="font-family: arial; font-size: 20px; color:whitesmoke">AYO SEGERA SEWA MOBIL KAMI UNTUK KEPERLUAN ANDA !!! LEBIH MURAH, LEBIH PRAKTIS,DAN PELAYANAN YANG LEBIH BAIK....</m></marquee>
            <br>
            </body>
            <div id="menuhor"style="position:absolute;right:7px;left:173px;top:370px;">
                 <a href="home.html"><m style="color:whitesmoke;font-family:Tahoma;font-size:27px">  HOME </a></m>
                 <a href="garasimobil.jsp"><m style="color:whitesmoke;font-family:Tahoma;font-size:27px">| GARASI MOBIL </a></m>
                 <a href="form.jsp"><m style="color:whitesmoke;font-family:Tahoma;font-size:27px">| SEWA MOBIL</a></m> 
                 <a href="kembali.jsp"><m style="color:whitesmoke;font-family:Tahoma;font-size:27px">|KEMBALI MOBIL</a></m>
                 <a href="tentangkami.jsp"><m style="color:whitesmoke;font-family:Tahoma;font-size:27px">| KONTAK KAMI</a></m>
            </div><br> <br></div> 
                <tr>
                    <td></td>  <td></td>   <td></td>
                     <td>  <center><h3 style="color:whitesmoke;font-family:Tahoma;font-size: 130%;outline-color: black;">ARMADA ROUTER RENT CAR YANG SIAP ANDA SEWA<br>
                    <br><br></h3>
                        <table>
                            <tr>
                                <td><img src="garasi mobil/APV.jpg"width="300" height="180">
                                    <center><h4 style="color: white;font-size: 170%">SUZUKI APV<br>Rp 300.000/12jam</h4></td>
                                <td><img src="garasi mobil/E320.jpg"width="300" height="180">
                                    <center><h4 style="color: white;font-size: 170%">MERCEDES E320<br>Rp 700.000/12jam</h4></td>
                                <td><img src="garasi mobil/Hyundai.JPG"width="300" height="180">
                                    <center><h4 style="color: white;font-size: 170%"> Hyundai MAK <br>Rp 250.000/12jam</h4></td>
                            </tr>
                            <tr>
                                <td><img src="garasi mobil/L300.jpg"width="300" height="180">
                                    <center><h4 style="color: white;font-size: 170%">MITSUBISHI<br>Rp 400.000/12jam</h4></td>
                                <td><img src="garasi mobil/Pregio.JPG"width="300" height="180">
                                    <center><h4 style="color: white;font-size: 170%">KIA PREGIO<br>Rp 350.000/12jam</h4></td>
                                <td><img src="garasi mobil/alphard.jpg"width="300" height="180">
                                    <center><h4 style="color: white;font-size: 170%">TOYOTA ALPHARD<br>Rp 500.000/12jam</h4></td>
                            </tr>
                            <tr>
                                <td><img src="garasi mobil/cr-v.jpg"width="300" height="180">
                                    <center><h4 style="color: white;font-size: 170%">HONDA CR-V<br>Rp 400.000/12jam</h4></td>
                                <td><img src="garasi mobil/elf.jpg"width="300" height="180">
                                    <center><h4 style="color: white;font-size: 170%">ISUZU ELF<br>Rp 450.000/12jam</h4></td>
                                <td><img src="garasi mobil/inova.jpg"width="300" height="180">
                                    <center><h4 style="color: white;font-size: 170%">TOYOTA INNOVA<br>Rp 300.000/12jam</h4></td>
                            </tr>
                            <tr>
                                <td><img src="garasi mobil/jazz.jpg"width="300" height="180">
                                    <center><h4 style="color: white;font-size: 170%">HONDA JAZZ<br>Rp 350.000/12jam</h4></td>
                                <td><img src="garasi mobil/livina.jpg"width="300" height="180">
                                    <center><h4 style="color: white;font-size: 170%">NISSAN LIVINA<br>Rp 300.000/12jam</h4></td>
                                <td><img src="garasi mobil/luxio.jpg"width="300" height="180">
                                    <center><h4 style="color: white;font-size: 170%">DAIHATSU LUXIO<br>Rp 400.000/12jam</h4></td>
                            </tr>
                            <tr>
                                <td><img src="garasi mobil/panther.jpg"width="300" height="180">
                                    <center><h4 style="color: white;font-size: 170%">ISUZU PANTHER<br>Rp 250.000/12jam</h4></td>
                                <td><img src="garasi mobil/terios.jpg"width="300" height="180">
                                    <center><h4 style="color: white;font-size: 170%">DAIHATSU TERIOS<br>Rp 400.000/12jam</h4></td>
                                <td><img src="garasi mobil/travello.jpg"width="300" height="180">
                                    <center><h4 style="color: white;font-size: 170%">KIA TRAVELLO<br>Rp 350.000/12jam</h4></td>
                            </tr>
                            <%
                            for (int idx = 0; idx < vmobil.size(); idx++) {

                %>
               
                    <td><img src="<%= vmobil.get(idx).getGambar()%>" height="180px" width="300px" >
                <center><h4 style="color: white;font-size: 170%"><%= vmobil.get(idx).getNamamobil()%><br>Rp
                <%= vmobil.get(idx).getHarga()%>/12jam</h4></td>
                
                <% } %>
                        </table>
            
                </html>
